<template>
  <div class="app-main-container tabpdding">
    <el-tabs v-model="activeTab">
      <el-tab-pane
        :label="translate('dcddmx')"
        name="0"
      ><Statistic
        v-if="activeTab === '0'"
        ref="statistic"
      /></el-tab-pane>
      <el-tab-pane
        :label="translate('cdsyfx')"
        name="1"
      ><SiteUseAnalysis
        v-if="activeTab === '1'"
        ref="SiteUseAnalysis"
      /></el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import Statistic from './list.vue'
import SiteUseAnalysis from '../siteUseAnalysis/index.vue'
export default {
  name: 'FieldStatisticsDetail',
  components: {
    Statistic,
    SiteUseAnalysis
  },
  data() {
    return {
      activeTab: '0'
    }
  },
  created() {
    // let activeTab = ''
    const meta = this.$route.meta.buttons || []
    // if (meta.indexOf('curriculumSales') > -1) {
    //   activeTab = '0'
    // } else if (meta.indexOf('CurriculumDetail') > -1) {
    //   activeTab = '1'
    // } else if (meta.indexOf('CurriculumDetailb') > -1) {
    //   activeTab = '2'
    // }
    // this.activeTab = activeTab
    this.meta = meta
  }

}
</script>

